<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
    <link rel="stylesheet" href="/login/login.css">
</head>

<body>
<!-- login.html -->
<div class="container right-panel-active">
    <!-- 注册 -->
    <div class="container__form container--signup">
        <form action="/user/uregister" method="post" class="form">
            <h2 class="form__title">注册</h2>
            <input type="text" name="username" placeholder="用户名" class="input" />
            <input type="text" name="phone" placeholder="手机号" class="input" />
            <input type="password" name="password" placeholder="密码" class="input" />
            <input type="password" name="password2" placeholder="请再次输入密码" class="input" />
            <input type="submit" value="注册" class="login_btn"/>
        </form>
    </div>

    <!-- 登录 -->
    <div class="container__form container--signin">
        <form action="/user/ulogin" method="post" class="form">
            <h2 class="form__title">登录</h2>
            <input type="text" name="username" placeholder="用户名" class="input" />
            <input type="password" name="password" placeholder="密码" class="input" />
            <a href="#" class="link">忘记密码?</a>
            <input type="submit" value="登录" class="login_btn" onclick="display_alert()"/>
        </form>
    </div>

    <!-- 封面 -->
    <div class="container__overlay">
        <div class="overlay">
            <div class="overlay__panel overlay--left">
                <button class="login_btn" id="signIn">登录</button>
            </div>
            <div class="overlay__panel overlay--right">
                <button class="login_btn" id="signUp">注册</button>
            </div>
        </div>
    </div>
</div>
</body>
<!-- partial -->
<script type="text/javascript" src="/login/login.js"></script>
<script type="text/javascript" th:inline="javascript">

    // 提示信息: 1.注册信息不能为空 2.两次输入的密码不一致 3.该用户名已注册
    function display_alert() {
        alert([[${tip_registered}]])
    }

</script>
</html>